dic = {"name":"zeno","age":18,"gender":"女"}
# 获取字典所有的键
for i in dic.keys():
    print(i)
# 获取字典所有的值
for i in dic.values():
    print(i)
# 获取字典所有的键值对
for k,v in dic.items(): # ("name","zeno")
    print(k,v) # k是键 v是值

print("name" in dic) # True
print("zeno" in dic)  # False
# 字典 判断是否在键中
# dic.values()获取所有的值
print("zeno" in dic.values())  # True

# items()同时获取到键和值
# 列表--对列表进行循环遍历 只能拿到值
# 同时拿到下标和值（后面再加上去）
j = 0
li = ["zeno","小白","小黑","大白"]
for i in li:
    print(j,i)
    j+=1

for i,j in enumerate(li):  # 前面的是下标，后面的是值
    print(i,j)

# 字典里面的键就相当于是列表里面的下标

